package com.jerry.base.java8.currying;

/**
 * 柯里化
 *
 * @author Jerry
 * @since 2024/7/31 21:51
 */
public class CurryingTest2 {

    @FunctionalInterface
    interface Fa {
        Fb operate(int a);
    }

    @FunctionalInterface
    interface Fb {
        int operate(int b);
    }

    public static void main(String[] args) {
        Fa fa = a -> b -> a + b;
        Fb fb = fa.operate(10);
        int result = fb.operate(20);
        System.out.println(result);
    }
}
